public class Test {
    public static void main() {
        // while循环
        int count = 0;
        while (count < 5) {
            count++;
            if (count == 2) {
                continue; // 跳过当前迭代
            }
            if (count == 4) {
                break; // 提前退出循环
            }
            System.out.println("While loop count: " + count);
        }

        // while 标签化
        int count2 = 0;
        outer: while (true) {
            count2++;
            while (true) {
                if (count2 == 2) {
                    continue outer; // 跳过外层循环的当前迭代
                }
                if (count2 == 4) {
                    break outer; // 提前退出外层循环
                }
                System.out.println("Nested While loop count2: " + count2);
                break; // 防止内层循环无限执行
            }
        }
    }
}